#include "uologin.h"
#include "ui_uologin.h"
#include <QMessageBox>
#include "control.h"
#include <QPushButton>
#include "qpixmap.h"


uologin::uologin(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::uologin)
{
    ui->setupUi(this);
    this->page=new control;
    connect(ui->loginbt,&QPushButton::clicked,[=]()
    {
        this->hide();
        this->page->show();
    }
);
}


uologin::~uologin()
{
    delete ui;
}

void uologin::on_loginbt_clicked()
{
        QString username=ui->userid->text();
        QString passwd=ui->passid->text();
        if(username=="root"&&passwd=="123456")
        {
            //QMessageBox::information(this,"登录提示","登陆成功");
        }
        else
        {
            QMessageBox::information(this,"登录提示","登陆失败");
        }
}

void uologin::on_quitbt_clicked()
{
    this->close();
}
